package com.simpletaskapp.domain;

import java.io.Serializable;
import java.text.SimpleDateFormat;
import java.util.Date;

public class Task implements Serializable {

	private static final long serialVersionUID = 2499361710509567214L;

	private Long id;

	private String description;

	private Date creationDate;
	
	private Boolean done;
	
	private static final SimpleDateFormat dateFormat = new SimpleDateFormat("EEE dd MMM");

	public Task() {
		this.creationDate = new Date();
		this.done = Boolean.FALSE;
	}
	
	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public String getDescription() {
		return description;
	}

	public void setDescription(String description) {
		this.description = description;
	}

	public Date getCreationDate() {
		return creationDate;
	}

	public void setCreationDate(Date creationDate) {
		this.creationDate = creationDate;
	}
	
	public String getCreationDateFormatted() {
		return dateFormat.format(creationDate);
	}

	public Boolean isDone() {
		return done;
	}

	public void setDone(Boolean done) {
		this.done = done;
	}
}